/**
TemplateGame.cpp
Title: Binge Template Game Program File
Descr: A skeleton to make it easier to construct a new game.

Copyright (c) 2010, Brant Ryan Anderson
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of the <ORGANIZATION> nor the names of its contributors
      may be used to endorse or promote products derived from this software
      without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**/

#include "TemplateGame.hpp"
GO_BINGE_GO(TemplateGame);

bool // Called before the engine has been initialized.
TemplateGame::gamePreload(void)
{ // USER DEFINED METHOD
	engine->setGameTitle("Template Game");
	engine->setFullscreen(false);
	engine->setScreenWidth(800);
	engine->setScreenHeight(600);
	engine->setColorDepth(32);
	return true;
}

bool // Called after the engine has been initialized.
TemplateGame::gameInit(void)
{ // USER DEFINED METHOD

	return true;
}

void // Called from the main game loop at max fps.
TemplateGame::gameHandleInput(sf::Event ev)
{ // USER DEFINED METHOD
	if( ev.Type == sf::Event::KeyPressed )
	{
		if(ev.Key.Code == sf::Key::Escape)
		{
			engine->Shutdown();
		}
		else if (ev.Key.Code == sf::Key::Space)
		{
            this->showBSDLicense();
		}
	}
}

void // Called for updating game data at max fps.
TemplateGame::gameUpdate(void)
{ // USER DEFINED METHOD

}

void // Called for rendering at 60 fps.
TemplateGame::gameRender(void)
{ // USER DEFINED METHOD

}

void // Tells you which entity has been updated at max fps.
TemplateGame::gameEntityUpdated(binge::Entity* entity)
{ // USER DEFINED METHOD

}

void // Tells you which entity has been rendered at 60 fps.
TemplateGame::gameEntityRendered(binge::Entity* entity)
{ // USER DEFINED METHOD

}

void // Tells you when two entities collide at 20 fps.
// Note: Each collision is reported twice per collision.
//       This is handy for testing entity1's ObjectType
//       against entity2's ObjectType. You will know that
//       entity1 is going to be "x-type" and entity2 is
//       going to be "y-type" etc...
TemplateGame::gameEntityCollision(binge::Entity* entity1, binge::Entity* entity2)
{ // USER DEFINED METHOD

}

void // Called when the game exits the main game loop.
TemplateGame::gameEnd(void)
{ // USER DEFINED METHOD
	this->showBSDLicense();
}

// PUT USER DEFINED METHODS BELOW HERE
